﻿package mortal.game.view.chat.selectPanel
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import extend.language.*;
    import flash.events.*;
    import mortal.component.gconst.*;
    import mortal.game.view.common.*;

    public class TransSelectPanel extends CallSprite
    {
        private var _btnPartTrans:GButton;
        private var _btnlittleTrans:GButton;
        private var _btnAllTrans:GButton;
        private var _btnHide:GButton;
        private var _btnShow:GButton;

        public function TransSelectPanel()
        {
            this.initChildren();
            return;
        }// end function

        private function initChildren() : void
        {
            var _loc_1:* = ResourceConst.getScaleBitmap("ToolTipBg");
            _loc_1.width = 82;
            _loc_1.height = 4 * 25 + 12;
            this.addChild(_loc_1);
            this._btnlittleTrans = this.createButton(0, littleTrans);
            this._btnPartTrans = this.createButton(1, partTrans);
            this._btnAllTrans = this.createButton(2, allTrans);
            this._btnHide = this.createButton(3, hidePanel);
            this._btnShow = this.createButton(3, showPanel);
            this._btnShow.visible = false;
            return;
        }// end function

        private function createButton(param1:int, param2:String) : GButton
        {
            var _loc_3:* = UIFactory.gButton(param2, 6, 5 + param1 * 25, 70, 24, this, "ChatTabBtn");
            _loc_3.addEventListener(MouseEvent.CLICK, this.clickHandler);
            return _loc_3;
        }// end function

        private function clickHandler(event:MouseEvent) : void
        {
            var _loc_2:* = event.currentTarget as GButton;
            if (_loc_2 == this._btnHide)
            {
                this._btnHide.visible = false;
                this._btnShow.visible = true;
            }
            if (_loc_2 == this._btnShow)
            {
                this._btnHide.visible = true;
                this._btnShow.visible = false;
            }
            this.callAll(_loc_2.label);
            return;
        }// end function

        public static function get partTrans() : String
        {
            return Language.getString(21364);
        }// end function

        public static function get littleTrans() : String
        {
            return Language.getString(21365);
        }// end function

        public static function get allTrans() : String
        {
            return Language.getString(21366);
        }// end function

        public static function get hidePanel() : String
        {
            return Language.getString(21367);
        }// end function

        public static function get showPanel() : String
        {
            return Language.getString(21368);
        }// end function

    }
}
